◊ This program is distributed as Shareware: if you like it or use it please honor the shareware system by sending $3 to the author at the address above. Since collecting international cheques is very expensive, please send cash only. If you MUST send a cheque, keep in mind that the banks will gobble up more than half of it.
◊ NOTE: Getting some (usually very few) bucks is what you write shareware for, but getting a note, a postcard or anything else is a lot better than getting nothing. I'd like to know how far this program has gone, so remember that you can do something nice even if you don't have a couple of $$$ to spare.
• WHAT IS TRAPPER, ANYWAY?
◊ Have you ever wondered where all your Mac's CPU processing power is going? Or why the Finder 7 looks slow even on 68040-based Macs? Rumors are that your machine is spending most of its time in the Operating System and Mac Toolbox routines (implemented through the 680x0 A-Trap mechanism). Cool. But what routines are being called? And are they all necessary, or is the Mac just running in circles?
◊ Trapper is a Control Panel/Extension combination that keeps track of ALL system routines (or "traps") by filtering the standard 680x0 trap dispatcher with a very compact counter routine. The Mac's speed won't be visibly affected (it'll be losing about 1 or 2 percent) and you'll be able to see ALL the system routines (even the undocumented ones) along with the number of times they have been called. Since this is a fairly large amount of data, it is stored into a text file for easy consultation and retrieval.
• SO WHAT'S THE MAC DOING?
◊ Well, my IIcx running 7.0.1 is calling something like 10000 traps per second. Running the Finder alone (without any extension at all except for the System 7 Tuner) and leaving it completely unattended for ten minutes gave the following results (a 'tick' is a 60th of second):
(this list looks good in Monaco 9 or Courier 10)
- BlockMove was called 60 times per second (once per tick)
- EmptyRgn was called 126 times per second (twice per tick)
- FMSwapFont was called 193 times per second (3 times per tick)
- FrontWindow was called 123 times per second (twice per tick)
- GetFontInfo was called 192 times per second (3 times per tick)
- GetHandleSize was called 60 times per second (once per tick)
- GetPort was called 100 times per second (almost twice per tick)
- OSDispatch was called 132 times per second (twice per tick)
- OSEventAvail was called 1783 times per second (30 times per tick)
- Pack14 was called 77 times per second (once per tick)
- EmptyRgn was called 154 times per second (3 times per tick)
- ScriptUtil was called 384 times per second (6 times per tick)
- SetPort was called 180 times per second (3 times per tick)
- StackSpace was called 196 times per second (3 times per tick)
- StripAddress was called 90 times per second (1.5 times per tick)
- TextFace was called 384 times per second (6 times per tick)
- TextFont was called 192 times per second (3 times per tick)
- TextSize was called 192 times per second (3 times per tick)
- TickCount was called 73 times per second (once per tick)
- UseResFile was called 58 times per second (once per tick)
- $A0DD was called 1780 times per second (30 times per tick)
- $A829 was called 235 times per second (4 times per tick)
- $ABF7 was called 1780 times per second (30 times per tick)
◊ Note that unless my counter is wrong, the Finder is changing its text font 192 times per second - even though it isn't drawing anything at all (I wasn't even moving the mouse!). The text face (things like bold, italic and so on) is changed 384 times per second. If anyone's got a good reason for this, please let me know.
• HOW MUCH MEMORY DOES TRAPPER USE?
◊ Trapper takes about 6K of system memory when installed. The file takes about 28K of disk space (mostly because of the Control Panel's A-Traps database).
• WHAT'S IN THE CONTROL PANEL?
◊ The Control Panel has three important buttons:
1. [Save Count File…] Saves a text file containing a list of all the A-Traps that have been called after Trapper was installed (or reset);
2. [Count File Options…] Displays a dialog with some options for the text file format;
3. [Reset A-Traps Count] Resets the A-Traps counter to all 0's.
• DISCLAIMER
◊ Trapper plays with very low level stuff. I've done everything I could to make it safe, but I don't guarantee anything. If you manage to blow up your Mac with this stuff, it's your own business. Use Trapper entirely at your own risk.
• VERSION HISTORY
◊ 1.03 - Added unknown traps count in the output file;
◊ 1.02 - Turned the extension into an easier-to-configure Control Panel;
◊ 1.01 - First vector-tables version, uses an extension/application combo;
◊ 1.00 - First cut using a single trap patch to track _SetPort.
• THANKS TO:
◊ Fabrizio Oddone and Alberto Ricci, who did all the beta-testing and gave lots of useful suggestions.
• HAVE FUN! And don't forget to $$$ SEND YOUR CONTRIBUTION $$$ so that more cool utilities will see the light in the near future, at the low-low-low costs of shareware.